﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace UMLDesigner
{
    class CompositionView : RelationView
    {
       
        public CompositionView()
        {
            endSymbolSize = 16;

            finalPolygon = new Point[] { 
                new Point(0,0),
                new Point(endSymbolSize/2, endSymbolSize/2),
                new Point(0, endSymbolSize),
                new Point(-endSymbolSize/2, endSymbolSize/2)
            };
            relationData.SetName("name");
            relationData.SetCardinalityIni("0..*");
            relationData.SetCardinalityEnd("1");
            relationData.SetAttrNameIni("attr2");
            relationData.SetAttrNameEnd("attr1");
            relationData.SetVisibilityEndAttribute(VisibilityType.PRIVATE);
            relationData.SetVisibilityIniAttribute(VisibilityType.PRIVATE);

            relationData.SetRelationType(RelationData.RelationType.Composition);

        }

        public override RelationView CreateObject()
        {
            return new CompositionView();
        }
    }
}
